package com.tyyw2.practice.controller;

import com.tyyw2.practice.service.IUserService;
import com.tyyw2.practice.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/practice/test")
@Api(tags = "API-测试类")
@Slf4j
public class TestController {

    @Autowired
    IUserService userService ;

    @PostMapping("/getAllUser")
    @ApiOperation("获取所有用户信息")
    public List<User> getAllUser(){
        return userService.selectList();
    }
}
